/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.transportes.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import pe.com.transportes.modelo.Chofer;

/**
 *
 * @author PFR
 */
public class ChoferDAO {


      public void insertarchofer(Connection con,Chofer c) throws SQLException{

    String sql ="insert into chofer values (?,?,?,?,?,?,?,?,?)";
    PreparedStatement ps = con.prepareStatement(sql);


    System.out.println("codigo dao "+c.getCod_chofer());

    ps.setString(1,c.getCod_chofer());
          ps.setString(2,c.getCod_ruta());
          ps.setString(3, c.getNom_chofer());
        ps.setString(4,c.getApe_chofer());
        ps.setInt(5,c.getTelefono());
        ps.setInt(6,c.getEdad());
        ps.setDouble(7, c.getSueldo());
        ps.setString(8, c.getFnacimiento());
        ps.setString(9, c.getTurno());


    ps.executeUpdate();
    }








}
